<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contatto-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'contacts'); ?>
		<?php echo $form->textField($model,'contacts',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'contacts'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idx_tipiContatto'); ?>
		<?php echo $form->dropDownList($model, 'idx_tipiContatto', CHtml::listData(TipoContatto::model()->findAll(), 'id', 'descr')); ?>
		<?php echo $form->error($model,'idx_tipiContatto'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idAutore'); ?>
		<?php 
                if(!$model->isNewRecord)
                    echo CHtml::encode($model->Autore->nome);
                else
                    echo CHtml::encode(Autore::model()->findByPk($_GET['idAutore'])->nome);
                ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->